package com.workcell.workdata.xthings.entity.mqtt;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.workcell.workdata.xthings.constant.ExtOutputAttributes;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 多功能电表数据表
 * @TableName t_power_meter_data
 */
@TableName(value ="t_power_meter_data")
@Accessors(chain = true)
@Data
public class PowerMeterData extends Model<PowerMeterData> implements Serializable {
    /**
     * 主键
     */
    private String id;

    /**
     * 主设备编码
     */
    private String masterDeviceNo;

	/**
	 *  厂商编码
	 */
	private String manufacturerCode;

    /**
     * 从设备编码
     */
    private String slaveDeviceNo;

    /**
     * 机器码
     */
    private String addressId;

    /**
     * A相电压
     */
	@ExtOutputAttributes(key = "A相电压")
    private String ua;

    /**
     * B相电压
     */
	@ExtOutputAttributes(key = "B相电压")
	private String ub;

    /**
     * C相电压
     */
	@ExtOutputAttributes(key = "C相电压")
	private String uc;

    /**
     * A相电流
     */
	@ExtOutputAttributes(key = "A相电流")
    private String ia;

    /**
     * B相电流
     */
	@ExtOutputAttributes(key = "B相电流")
    private String ib;

    /**
     * C相电流
     */
	@ExtOutputAttributes(key = "C相电流")
    private String ic;

    /**
     * A相有功功率
     */
	@ExtOutputAttributes(key = "A相有功功率")
    private String pa;

    /**
     * B相有功功率
     */
	@ExtOutputAttributes(key = "B相有功功率")
    private String pb;

    /**
     * C相有功功率
     */
	@ExtOutputAttributes(key = "C相有功功率")
    private String pc;

    /**
     * A相无功功率
     */
	@ExtOutputAttributes(key = "A相无功功率")
    private String qa;

    /**
     * B相无功功率
     */
	@ExtOutputAttributes(key = "B相无功功率")
    private String qb;

    /**
     * C相无功功率
     */
	@ExtOutputAttributes(key = "C相无功功率")
    private String qc;

    /**
     * A相功率因数
     */
	@ExtOutputAttributes(key = "A相功率因数")
    private String cosqa;

    /**
     * B相功率因数
     */
	@ExtOutputAttributes(key = "B相功率因数")
    private String cosqb;

    /**
     * C相功率因数
     */
	@ExtOutputAttributes(key = "C相功率因数")
    private String cosqc;

    /**
     * 电压频率
     */
	@ExtOutputAttributes(key = "电压频率")
    private String fr;

    /**
     * 当前总有功电能
     */
	@ExtOutputAttributes(key = "当前总有功电能")
    private String taee;

    /**
     * 当前正向总有功电能
     */
	@ExtOutputAttributes(key = "当前正向总有功电能")
    private String ptaee;

    /**
     * 当前反向总有功功能
     */
	@ExtOutputAttributes(key = "当前反向总有功功能")
    private String natee;

    /**
     * 当前总无功电能
     */
	@ExtOutputAttributes(key = "当前总无功电能")
    private String tare;

    /**
     * 当前正向总无功电能
     */
	@ExtOutputAttributes(key = "当前正向总无功电能")
    private String ptare;

    /**
     * 当前负向总无功电能
     */
	@ExtOutputAttributes(key = "当前负向总无功电能")
    private String ntare;

    /**
     * 数据入库时间
     */
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
